import MainPage from "@/pages/main-page/index.vue";
import { createRouter, createWebHashHistory } from "vue-router";
import { routerGuard } from "@/router/guard";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "main",
      component: MainPage,
    },
    {
      path: "/:pathMatch(.*)*",
      name: "not-found",
      meta: { anonymous: true },
      component: () => import("@/pages/not-found/index.vue"),
    },
  ],
});

routerGuard(router);
export default router;
